home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / admin / snmp-dev.000 / snmp-dev / etc / installconf < prev    next >
Encoding:
Text File  |  1995-07-09  |  592 b   |  31 lines

  1. #! /bin/sh
  2. ##
  3. ## installconf:                        Jan 1995
  4. ##
  5.  
  6. if [ ! -f ./snmpd.conf -o ! -f ./installconf ] ; then
  7.     echo ""
  8.     echo "please run me from the \`\`cmu-snmp2.1.2l3/etc'' directory"
  9.     echo ""
  10.     exit 1 
  11. fi
  12.  
  13. if [ $# != 2 ] ; then
  14.     echo ""
  15.     echo "use: $0  <hostname>  <ip-addr>"
  16.     echo ""
  17.     echo "with your hostname and ip-address to install the cmu-snmp config-files."
  18.     echo ""
  19.     exit 1
  20. fi
  21.  
  22. cnf="acl.conf party.conf context.conf view.conf snmpd.conf mib.txt"
  23.  
  24. for f in $cnf ; do
  25.     echo "installing /etc/$f"
  26.     sed -e 's/134.169.234.29/'"$2"'/g' -e 's/chappell/'"$1"'/g' \
  27.         < $f > /etc/$f
  28. done
  29.  
  30. echo done.
  31.